Moving picture data has typically a large size. A device handling the moving picture data compresses the moving picture data through encoding if the device transmits the moving picture data to another device or stores the moving picture data onto a storage device. Widely used as typical encoding methods of a moving picture are moving picture experts group phase 2 (MPEG-2), MPEG-4, H.264 MPEG-4 advanced video coding (H.264 MPEG-4 AVC) standardized by the International Standardization Organization/International Electro technical Commission (ISO/IEC).
In such encoding methods, inter-encoding techniques are used. In the inter-encoding technique, a picture as an encoding target is encoded based on information related to the encoding target picture and pictures prior to and subsequent to the encoding target picture. In the inter-encoding technique, the encoding target picture is split into a plurality blocks. A region of a reference picture, which has been already decoded from encoded pictures prior to or subsequent to the target picture, and which is most similar to a block is selected through block matching in order to compensate for motion between pictures. A spatial travel distance between the most similar region and an encoding target block is thus calculated as a motion vector. The block on the reference picture most similar to the encoding target block is shifted to the same position of the encoding target block on the picture in order to generate a prediction image. The motion vector and difference information between the prediction image and the encoding target block are encoded. The inter-encoding technique removes redundant information and thus achieves a higher compression efficiency than the intra-encoding technique that encodes a picture using only information included in a single picture as an encoding target. Japanese Unexamined Patent Application Publication No. 9-139948 describes a technique that performs a motion compensation at a high accuracy level using a plurality of motion vectors calculated among an encoding target picture and a plurality of reference pictures. Japanese Unexamined Patent Application Publication No. 2009-21864 describes a technique that determines a search area on a reference picture as a block matching target depending on the degree of variations in the motion vector surrounding a target block.
The motion vector is produced on a per block basis. A plurality of motion vectors are generated for each block in a bi-directional prediction picture in which a prediction image is generated based on at least two reference pictures. An amount of information for encoding the motion vector is to be reduced in order to enhance further the compression efficiency. In H.264 MPEG-4 AVC, a temporal direct mode is used as one of the inter-encoding techniques in order to reduce an encoding amount related to a motion vector of a bi-directional prediction picture. In the temporal direct mode, a motion vector of a block on an already encoded reference picture P1 at the same position as the position of an encoding target block of a bi-directional prediction picture is determined as a co-located vector that determines the motion vector of the encoding target block. The motion vector of the encoding target block is calculated by adjusting the co-located vector in accordance with a ratio (t1/t2) of a time interval t1 to a time interval t2. The time interval t1 is between a picture including the encoding target block and the reference picture P1, and the time interval t2 is between a picture as a reference source of the co-located vector and a picture as a reference destination of the co-located vector. Since the co-located vector is encoded, the moving picture encoding apparatus is free from including in the encoded moving picture data the motion vector of the bi-directional prediction picture. The moving picture encoding apparatus working in the temporal direct mode provides an even higher compression efficiency.
There is a possibility that a block on a reference picture at the same position as the position of an encoding target block on an encoding target picture includes an image that moves in a fashion different from an image included in the encoding target block. In such a case, if a motion vector of the block on the reference picture having the same position as the position of the encoding target block is the co-located vector, a variation in corresponding pixels between the encoding target block and the prediction image may increase, and the encoding efficiency may decrease. Japanese Laid-open Patent Publication No. 2007-67731 describes a technique that calculates the co-located vector based on a motion vector passing through the encoding target block from among the motion vectors determined for blocks of the reference picture.